import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';

export type UserDocument = User & Document;

@Schema()
export class User extends Document {
  @Prop()
  phone: string;
  @Prop()
  u_name: string;
  @Prop()
  sex: number;
  @Prop()
  age: number;
  @Prop()
  created_time: Date;
  @Prop()
  updated_time: Date;
}

export const UserSchema = SchemaFactory.createForClass(User);
